/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package apt;

import java.awt.FlowLayout;
import java.awt.HeadlessException;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;

/**
 *
 * @author PhiNguyen
 */
public class LabelDemo extends JFrame{

    private JLabel lblUser;
    private JLabel lblImage;
    
    public LabelDemo(String title) throws HeadlessException {
        super(title);
        
        FlowLayout layout = new FlowLayout();
        this.setLayout(layout);
        
        lblUser = new JLabel("Username");
        this.add(lblUser);
//        this.pack();
        Icon icon = new ImageIcon(this.getClass().getResource("Snapshot_2012-09-27_141823.png"));
        
        lblImage = new JLabel(icon);
        this.add(lblImage);
    }
    
    
}
